package com.tengju.bff.interfaces.covercharge.constant;

/**
 * 银行账户状态
 *
 * @author zhaoyi
 */
public enum BankStatus {

    /**启用*/
    enable("enable", "启用"),

    /**已解绑*/
    unlink("unlink", "已解绑");

    private String code;
    private String desc;

    BankStatus(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() { return this.code; }

    public String getDesc() {
        return this.desc;
    }

    public String toString(){ return this.code; }

    public static BankStatus getStatusDesc (String code){
        for(BankStatus thisEnum : (BankStatus.values())){
            if(thisEnum.getCode().equals(code)){//如果传入的code与此枚举code相同，则返回此枚举
                return thisEnum;
            }
        }
        return null;
    }
}
